FROM php:5.6-fpm
#//更新软件源
RUN apt update
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/

RUN apt-get install -yqq libzip-dev zip unzip && docker-php-ext-configure zip && docker-php-ext-install zip 

RUN docker-php-ext-install opcache 
# Copy opcache configration
COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini

RUN apt-get update && \
    apt-get install -yqq libmagickwand-dev imagemagick && \
      pecl install imagick; \
    docker-php-ext-enable imagick; 

RUN apt-get install -yqq libc-client-dev libkrb5-dev && \
    docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
    docker-php-ext-install imap 

RUN docker-php-ext-install exif

RUN apt-get install -yqq zlib1g-dev libicu-dev g++ && \
    docker-php-ext-configure intl && \
    docker-php-ext-install intl

RUN apt-get -y install libxslt-dev && \
    docker-php-ext-install xsl && \
    docker-php-ext-install pcntl


RUN chmod +x /usr/local/bin/install-php-extensions && sync && \
    install-php-extensions gd

RUN docker-php-ext-install pdo_mysql \
    && docker-php-ext-install bcmath \
&& pecl install -o -f redis \
    && rm -rf /tmp/pear \
        && docker-php-ext-enable redis

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
